<template>
  <div>
    <h2 class="public-title">代理制度</h2>
    <img :src="imgRequest+imgUrl" alt="">
  </div>
</template>
<style scoped>
img {
  width: 100%;
  height: 100%;
  margin-top: 20px;
}
.pc-cont {
  padding-top: 0px;
}
</style>

<script>
import { jsonToString } from "@/common/js/jsonToString";
export default {
  data() {
    return {
      imgUrl: ""
    };
  }, 
  created() {
    this.getAgencyRole();
  },
  methods: {
    getAgencyRole: function() {
      if (localStorage.getItem("userData") != null) {
        var params = {
          token: localStorage.getItem("token")
        };
      }
      this.$http
        .get(
          this.urlRequest + "?m=api&c=user&a=agentSystempc",
          jsonToString(params)
        )
        .then(res => {
          if (res.data.status == 0) {
            this.imgUrl = res.data.img_url;
          }
        });
    }
  },
  watch: {
    '$route'(){
      this.getAgencyRole();
    }
  }
};
</script>




// WEBPACK FOOTER //
// src/components/PersonalCenter/agencyShare/agencyRole.vue